home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
editor
/
timelapse.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-03-11
|
2KB
|
89 lines
/* TimeLapse.rexx -- Record frames at intervals of 1 to 60 mins */
/* By Arnie Cachelin © 1992 NewTek Inc. */
/* 4.0'ised by Bob Caron */
OPTIONS RESULTS
TOASTERLIB="ToasterARexx.port"
REXXLIB = "rexxsupport.library"
call addlib('PROJECT_REXX_PORT' , 0)
call ADDLIB(TOASTERLIB , 0)
call set_view(2)
if req_tell("TimeLapse 2.0") = 0 then call quit
rx startfilereq("Save Frames Where?","Toaster:Images","TimeLapse.Rgb")
exit=1
do while exit=1
name=queryfilereq()
if name=0 then call quit
if name~="" then exit=0
address command "c:wait 1"
say name
end
delay=0
do while(delay<1)
delay=req_number("Delay In Minutes",'01')
if delay="Delay In Minutes" then call quit
end
tdelay=delay
count=0
do while(count<1)
count=req_number("Number Of Frames To Grab",100)
if count="Number Of Frames To Grab" then call quit
end
input=req_number("Input To Grab From 1-4",1)
if input="Input To Grab From 1-4" then call quit
if input>4 then input=4
if req_tell("Still want to continue?")=0 then call quit
inputp="P00"||input
inputm="M00"||input
if delay="" then delay = 1
if delay<1 then delay = 1
if delay>60 then delay = 60
if count="" then count=10
if count>1000 then count=1000
if name="" then name=left(date(),6)
delay=delay*60
Switcher(TOSW) /* Go to Switcher screen */
Switcher(inputp)
Switcher(inputm)
Switcher(LVID) /* Set to live digital video */
do f=0 to count
Switcher(FVID) /* Freeze frame */
fname =strip(name)||"."||right(f,3,'0')
SaveNextFrame(fname)
Switcher(LVID) /* Set to live digital video */
call req_open("Timelapse 2.0","Current Frame ("||right(f,3,'0')||")","Current Delay ("||tdelay||")")
address command "C:Wait "||delay
call req_close()
end
call req_tell("All done!")
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
exit
SaveNextFrame: Procedure
arg name
t=switcher(SRGB,name,4,0)
return t
quit:
call req_tell("Canceled!")
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
exit
/* A big thanks to Mojo! (Siyakubongela!) */